package com.jihu.design.structural.bridge;

/**
 * @author jihu
 * @date 2021/9/18
 */
public class MainTest {

    public static void main(String[] args) {

        IPhone iPhone = new IPhone();
        iPhone.setSale(new OfflineSale("线下渠道",9999));
        String phone = iPhone.getPhone();
        System.out.println(phone);


        IPhone iPhone2 = new IPhone();
        iPhone2.setSale(new OnlineSale("线上渠道",9999));
        String phone2 = iPhone2.getPhone();
        System.out.println(phone2);

        IPhone iPhone3 = new IPhone();
        iPhone3.setSale(new StudentSale("学生渠道",9999));
        String phone3 = iPhone3.getPhone();
        System.out.println(phone3);

    }
}
